import axios from "axios"
const module = {
    namespaced: true,
    state: {
        dataList: ""
    },
    mutations: {
        setDataList(state,data){
            state.dataList = data
        },
    },
    actions:{
        getDataList({ commit },categoryId) {
            axios.get(`http://www.mei.com/appapi/event/product/v3?pageIndex=1&categoryId=${ categoryId }&key=&sort=&timestamp=1586563043848&
            summary=fc8866b719b21fa0ef4ae43e5258f89c&platform_code=H5`).then(res => {
                commit('setDataList',res.data.products)
            })
        }
    }
}

export default module